#pragma once

#define WHITE_MAN 1
#define WHITE_KING 2
#define BLACK_MAN 3
#define BLACK_KING 4

using namespace System;


namespace ComputerEngine
{
	public enum class eFigureType { WhiteMan, BlackMan, WhiteKing, BlackKing, Nothing };

	public ref class Coordinate
	{
	public:
		int Row;
		int Col;
		eFigureType FigureType;

		Coordinate(int row, int col)
		{
			Row = row;
			Col = col;
			FigureType = eFigureType::Nothing;
		}

		Coordinate(int row, int col, eFigureType figType)
		{
			Row = row;
			Col = col;
			FigureType = figType;
		}

	};

	public ref class OutputBitBoard
	{
	public:
		uint64 wm;
		uint64 bm;
		uint64 wk;
		uint64 bk;
		int iEval;
		uint8 DTM;
		int Depth;
		int CalmPosDepth;
		int NumberOfNodes;
		int NodesPerSecond;
		int CacheHit;
	};

	public ref class CheckersBoard
	{
	public:
		array<Coordinate^, 2>^ Board;
		uint32 BoardSize;
	};


	// converts managed checkers board to bitboard
	BitBoard MakeBitBoard(CheckersBoard^ board);
	BitBoard64 MakeBitBoard64(CheckersBoard^ board);

	// convert engine bitboard to mananged output bitboard
	OutputBitBoard^ ConvertMoveBitBoard(BitBoard bb);
	OutputBitBoard^ ConvertMoveBitBoard64(BitBoard64 bb);

	// convert output managed bitboard to engine bitboard
	BitBoard ConvertFromOutputBitBoard(OutputBitBoard^ obb);
	BitBoard64 ConvertFromOutputBitBoard64(OutputBitBoard^ obb);

}
